home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / S / Sample jGNE-cdev 1.2.1.sit / Sample JGNE_cdev 1.2.1 / (MyJGNE.π) / MyEvtHandler.c < prev    next >
MacBinary  |  1994-08-04  |  2.3 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: MyEvtHandler.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Thu Aug 4 13:02:58 1994, modified Thu Aug 4 13:02:58 1994, creator Think C, type ASCII, 1716 bytes "MyEvtHandler.c" , at 0x734 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 4d 79 45 76 74 48 | 61 6e 64 6c 65 72 2e 63 |..MyEvtH|andler.c|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 06 b4 00 | 00 01 7e aa 66 cf c2 aa |........|..~.f...|
|00000060| 66 cf c2 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |f.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 c8 17 00 00 |........|........|
|00000080| 2f 2a 0d 09 4d 79 45 76 | 74 48 61 6e 64 6c 65 72 |/*..MyEv|tHandler|
|00000090| 2e 63 0d 0d 09 57 72 69 | 74 74 65 6e 20 62 79 20 |.c...Wri|tten by |
|000000a0| 4b 65 6e 20 57 6f 72 6c | 65 79 2c 20 30 36 2f 30 |Ken Worl|ey, 06/0|
|000000b0| 33 2f 39 34 2c 20 75 73 | 69 6e 67 20 53 79 6d 61 |3/94, us|ing Syma|
|000000c0| 6e 74 65 63 20 54 68 69 | 6e 6b 20 43 20 37 2e 30 |ntec Thi|nk C 7.0|
|000000d0| 2e 0d 09 43 6f 70 79 72 | 69 67 68 74 20 31 39 39 |...Copyr|ight 199|
|000000e0| 34 2e 0d 09 41 4f 4c 20 | 4b 4e 45 77 6f 72 6c 65 |4...AOL |KNEworle|
|000000f0| 79 0d 09 69 6e 74 65 72 | 6e 65 74 20 4b 4e 45 77 |y..inter|net KNEw|
|00000100| 6f 72 6c 65 79 40 61 6f | 6c 2e 63 6f 6d 0d 09 0d |orley@ao|l.com...|
|00000110| 09 46 65 65 6c 20 66 72 | 65 65 20 74 6f 20 75 73 |.Feel fr|ee to us|
|00000120| 65 20 74 68 69 73 20 63 | 6f 64 65 20 69 6e 20 61 |e this c|ode in a|
|00000130| 20 70 72 6f 6a 65 63 74 | 20 6f 66 20 79 6f 75 72 | project| of your|
|00000140| 20 6f 77 6e 2c 20 62 75 | 74 20 67 69 76 65 20 6d | own, bu|t give m|
|00000150| 65 20 70 72 6f 70 65 72 | 0d 09 63 72 65 64 69 74 |e proper|..credit|
|00000160| 20 69 6e 20 79 6f 75 72 | 20 64 6f 63 75 6d 65 6e | in your| documen|
|00000170| 74 61 74 69 6f 6e 20 6f | 72 20 61 62 6f 75 74 20 |tation o|r about |
|00000180| 62 6f 78 2e 20 20 46 65 | 65 6c 20 66 72 65 65 20 |box. Fe|el free |
|00000190| 74 6f 20 64 69 73 74 72 | 69 62 75 74 65 20 74 68 |to distr|ibute th|
|000001a0| 69 73 0d 09 63 6f 64 65 | 20 69 6e 20 69 74 73 20 |is..code| in its |
|000001b0| 65 6e 74 69 72 65 74 79 | 20 74 6f 20 61 6e 79 6f |entirety| to anyo|
|000001c0| 6e 65 2c 20 62 75 74 20 | 6e 65 76 65 72 20 64 6f |ne, but |never do|
|000001d0| 20 73 6f 20 77 69 74 68 | 6f 75 74 20 74 68 65 20 | so with|out the |
|000001e0| 63 6f 70 79 72 69 67 68 | 74 0d 09 6e 6f 74 69 63 |copyrigh|t..notic|
|000001f0| 65 20 61 62 6f 76 65 20 | 6e 6f 72 20 77 69 74 68 |e above |nor with|
|00000200| 6f 75 74 20 69 74 73 20 | 61 63 63 6f 6d 70 61 6e |out its |accompan|
|00000210| 79 69 6e 67 20 66 69 6c | 65 73 2e 20 20 54 68 69 |ying fil|es. Thi|
|00000220| 73 20 63 6f 64 65 20 69 | 73 20 4e 4f 54 20 69 6e |s code i|s NOT in|
|00000230| 0d 09 74 68 65 20 70 75 | 62 6c 69 63 20 64 6f 6d |..the pu|blic dom|
|00000240| 61 69 6e 2e 20 20 55 73 | 65 20 6f 66 20 74 68 69 |ain. Us|e of thi|
|00000250| 73 20 63 6f 64 65 20 69 | 6e 20 61 20 63 6f 6d 6d |s code i|n a comm|
|00000260| 65 72 63 69 61 6c 20 70 | 72 6f 64 75 63 74 20 72 |ercial p|roduct r|
|00000270| 65 71 75 69 72 65 73 20 | 6d 79 0d 09 70 65 72 6d |equires |my..perm|
|00000280| 69 73 73 69 6f 6e 2e 0d | 09 0d 09 54 68 69 73 20 |ission..|...This |
|00000290| 63 6f 64 65 20 69 73 20 | 63 61 6c 6c 65 64 20 62 |code is |called b|
|000002a0| 79 20 74 68 65 20 4a 47 | 4e 45 20 66 69 6c 74 65 |y the JG|NE filte|
|000002b0| 72 20 63 6f 64 65 20 74 | 6f 20 65 78 61 6d 69 6e |r code t|o examin|
|000002c0| 65 20 65 76 65 6e 74 73 | 20 61 6e 64 20 74 6f 0d |e events| and to.|
|000002d0| 09 74 61 6b 65 20 61 63 | 74 69 6f 6e 20 6f 6e 20 |.take ac|tion on |
|000002e0| 69 6e 74 65 72 63 65 70 | 74 65 64 20 65 76 65 6e |intercep|ted even|
|000002f0| 74 73 2e 20 20 4d 79 45 | 76 74 48 61 6e 64 6c 65 |ts. MyE|vtHandle|
|00000300| 72 20 72 65 74 75 72 6e | 73 20 6e 6f 6e 7a 65 72 |r return|s nonzer|
|00000310| 6f 20 69 66 20 74 68 65 | 20 65 76 65 6e 74 0d 09 |o if the| event..|
|00000320| 73 68 6f 75 6c 64 20 62 | 65 20 69 6e 74 65 72 63 |should b|e interc|
|00000330| 65 70 74 65 64 20 28 72 | 65 74 75 72 6e 65 64 20 |epted (r|eturned |
|00000340| 74 6f 20 74 68 65 20 63 | 61 6c 6c 69 6e 67 20 61 |to the c|alling a|
|00000350| 70 70 6c 69 63 61 74 69 | 6f 6e 20 61 73 20 61 20 |pplicati|on as a |
|00000360| 4e 55 4c 4c 20 65 76 65 | 6e 74 29 2c 0d 09 6f 72 |NULL eve|nt),..or|
|00000370| 20 66 61 6c 73 65 20 69 | 66 20 74 68 65 20 65 76 | false i|f the ev|
|00000380| 65 6e 74 20 73 68 6f 75 | 6c 64 20 62 65 20 72 65 |ent shou|ld be re|
|00000390| 74 75 72 6e 65 64 20 74 | 6f 20 74 68 65 20 61 70 |turned t|o the ap|
|000003a0| 70 20 61 73 20 75 73 75 | 61 6c 2e 20 20 4d 79 45 |p as usu|al. MyE|
|000003b0| 76 74 48 61 6e 64 6c 65 | 72 0d 09 67 65 74 73 20 |vtHandle|r..gets |
|000003c0| 63 61 6c 6c 65 64 20 66 | 6f 72 20 45 56 45 52 59 |called f|or EVERY|
|000003d0| 20 65 76 65 6e 74 20 73 | 65 6e 74 20 74 6f 20 61 | event s|ent to a|
|000003e0| 6e 79 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 2e 0d |ny appli|cation..|
|000003f0| 2a 2f 0d 0d 0d 23 69 6e | 63 6c 75 64 65 20 3c 50 |*/...#in|clude <P|
|00000400| 72 6f 63 65 73 73 65 73 | 2e 68 3e 0d 0d 2f 2a 2a |rocesses|.h>../**|
|00000410| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000420| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 20 46 55 4e 43 54 49 |********|* FUNCTI|
|00000430| 4f 4e 53 20 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ONS ****|********|
|00000440| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000450| 2a 2f 0d 0d 2f 2f 20 54 | 68 65 20 4d 79 45 76 74 |*/..// T|he MyEvt|
|00000460| 48 61 6e 64 6c 65 72 20 | 72 6f 75 74 69 6e 65 20 |Handler |routine |
|00000470| 67 65 74 73 20 63 61 6c | 6c 65 64 20 74 6f 20 65 |gets cal|led to e|
|00000480| 78 61 6d 69 6e 65 20 65 | 76 65 72 79 20 65 76 65 |xamine e|very eve|
|00000490| 6e 74 20 70 61 73 73 65 | 64 20 74 6f 0d 2f 2f 20 |nt passe|d to.// |
|000004a0| 61 6e 79 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2e |any appl|ication.|
|000004b0| 20 20 43 75 72 72 65 6e | 74 6c 79 2c 20 69 74 20 | Curren|tly, it |
|000004c0| 6f 6e 6c 79 20 63 68 65 | 63 6b 73 20 74 6f 20 73 |only che|cks to s|
|000004d0| 65 65 20 69 66 20 74 68 | 65 20 65 76 65 6e 74 20 |ee if th|e event |
|000004e0| 69 73 0d 2f 2f 20 61 20 | 6d 6f 75 73 65 44 6f 77 |is.// a |mouseDow|
|000004f0| 6e 20 65 76 65 6e 74 20 | 61 6e 64 20 69 66 20 74 |n event |and if t|
|00000500| 68 65 20 73 61 6d 65 20 | 6d 6f 64 69 66 69 65 72 |he same |modifier|
|00000510| 20 6b 65 79 73 20 61 72 | 65 20 64 6f 77 6e 20 74 | keys ar|e down t|
|00000520| 68 61 74 20 61 72 65 20 | 73 65 74 0d 2f 2f 20 69 |hat are |set.// i|
|00000530| 6e 20 74 68 65 20 63 6f | 6e 74 72 6f 6c 20 70 61 |n the co|ntrol pa|
|00000540| 6e 65 6c 2e 20 20 49 66 | 20 73 6f 2c 20 69 74 20 |nel. If| so, it |
|00000550| 70 6c 61 79 73 20 61 20 | 73 79 73 74 65 6d 20 62 |plays a |system b|
|00000560| 65 65 70 20 61 6e 64 20 | 69 6e 64 69 63 61 74 65 |eep and |indicate|
|00000570| 73 0d 2f 2f 20 74 68 61 | 74 20 74 68 65 20 65 76 |s.// tha|t the ev|
|00000580| 65 6e 74 20 73 68 6f 75 | 6c 64 20 62 65 20 69 6e |ent shou|ld be in|
|00000590| 74 65 72 63 65 70 74 65 | 64 20 28 62 79 20 72 65 |tercepte|d (by re|
|000005a0| 74 75 72 6e 69 6e 67 20 | 6e 6f 6e 7a 65 72 6f 29 |turning |nonzero)|
|000005b0| 2e 20 20 4f 74 68 65 72 | 77 69 73 65 2c 0d 2f 2f |. Other|wise,.//|
|000005c0| 20 74 68 65 20 72 6f 75 | 74 69 6e 65 20 73 69 6d | the rou|tine sim|
|000005d0| 70 6c 79 20 72 65 74 75 | 72 6e 73 20 7a 65 72 6f |ply retu|rns zero|
|000005e0| 20 74 6f 20 69 6e 64 69 | 63 61 74 65 20 74 68 65 | to indi|cate the|
|000005f0| 20 65 76 65 6e 74 20 73 | 68 6f 75 6c 64 20 62 65 | event s|hould be|
|00000600| 20 68 61 6e 64 6c 65 64 | 0d 2f 2f 20 62 79 20 74 | handled|.// by t|
|00000610| 68 65 20 73 79 73 74 65 | 6d 20 61 73 20 75 73 75 |he syste|m as usu|
|00000620| 61 6c 20 28 70 61 73 73 | 20 69 74 20 74 6f 20 74 |al (pass| it to t|
|00000630| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 29 2e |he appli|cation).|
|00000640| 0d 2f 2f 0d 42 6f 6f 6c | 65 61 6e 09 4d 79 45 76 |.//.Bool|ean.MyEv|
|00000650| 74 48 61 6e 64 6c 65 72 | 28 20 45 76 65 6e 74 52 |tHandler|( EventR|
|00000660| 65 63 6f 72 64 20 2a 65 | 76 65 6e 74 20 29 0d 7b |ecord *e|vent ).{|
|00000670| 0d 09 42 6f 6f 6c 65 61 | 6e 09 72 65 74 56 61 6c |..Boolea|n.retVal|
|00000680| 75 65 3b 0d 09 0d 09 69 | 66 20 28 20 28 20 65 76 |ue;....i|f ( ( ev|
|00000690| 65 6e 74 2d 3e 77 68 61 | 74 20 3d 3d 20 6d 6f 75 |ent->wha|t == mou|
|000006a0| 73 65 44 6f 77 6e 20 29 | 20 26 26 0d 09 09 28 20 |seDown )| &&...( |
|000006b0| 6d 79 44 61 74 61 2e 43 | 50 6d 6f 64 69 66 69 65 |myData.C|Pmodifie|
|000006c0| 72 73 20 3d 3d 20 65 76 | 65 6e 74 2d 3e 6d 6f 64 |rs == ev|ent->mod|
|000006d0| 69 66 69 65 72 73 20 29 | 20 29 0d 09 7b 0d 09 09 |ifiers )| )..{...|
|000006e0| 53 79 73 42 65 65 70 28 | 20 35 20 29 3b 0d 09 09 |SysBeep(| 5 );...|
|000006f0| 72 65 74 56 61 6c 75 65 | 20 3d 20 74 72 75 65 3b |retValue| = true;|
|00000700| 0d 09 7d 0d 09 65 6c 73 | 65 0d 09 09 72 65 74 56 |..}..els|e...retV|
|00000710| 61 6c 75 65 20 3d 20 66 | 61 6c 73 65 3b 0d 09 0d |alue = f|alse;...|
|00000720| 09 72 65 74 75 72 6e 20 | 72 65 74 56 61 6c 75 65 |.return |retValue|
|00000730| 3b 0d 7d 0d 00 00 00 00 | 00 00 00 00 00 00 00 00 |;.}.....|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000790| 5a 45 00 00 01 6a 44 42 | 53 54 00 00 01 76 44 42 |ZE...jDB|ST...vDB|
|000007a0| 57 53 00 00 01 82 43 52 | 45 4c 00 00 01 8e 44 42 |WS....CR|EL....DB|
|000007b0| 0e 4d 79 45 76 74 48 61 | 6e 64 6c 65 72 2e 63 4d |.MyEvtHa|ndler.cM|
|000007c0| 02 00 00 00 50 61 72 74 | 53 49 54 78 00 00 00 00 |....Part|SITx....|
|000007d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 aa da 77 d3 00 00 | 00 00 00 00 01 7e 00 00 |....w...|.....~..|
|00000800| 09 d0 00 32 a1 7c 00 00 | ff ff 00 00 06 2a 00 32 |...2.|..|.....*.2|
|00000810| a1 94 00 02 ff ff 00 00 | 06 8e 00 32 a1 50 00 01 |........|...2.P..|
|00000820| ff ff 14 00 12 ba 00 32 | a1 4c 00 00 ff ff 00 00 |.......2|.L......|
|00000830| 06 96 00 32 a1 90 00 00 | ff ff 00 00 06 9a 00 32 |...2....|.......2|
|00000840| a1 88 00 00 ff ff 00 00 | 06 9e 00 32 a1 8c 00 00 |........|...2....|
|00000850| ff ff 00 00 06 a2 00 32 | a1 84 21 ba 00 06 00 00 |.......2|..!.....|
|00000860| 09 f4 00 32 a1 78 1b 08 | 00 14 00 00 09 fa 00 32 |...2.x..|.......2|
|00000870| a1 74 0c f7 00 21 00 00 | 0a 1e 00 32 a1 70 6c 5b |.t...!..|...2.pl[|
|00000880| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000890| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008a0| 00 00 00 00 00 00 00 06 | 00 04 00 2a 00 03 01 dd |........|...*....|
|000008b0| 02 7d 00 4c 00 18 01 d6 | 02 40 aa 66 89 82 00 00 |.}.L....|.@.f....|
|000008c0| 06 9c 00 00 06 9c 00 00 | 00 00 00 00 00 00 01 00 |........|........|
|000008d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 4b 99 cc |...L...L|...2.K..|
|000008e0| 0f 6e 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.n.....2|..MPSR..|
|000008f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 4b 97 f0 00 00 |........|...K....|
+--------+-------------------------+-------------------------+--------+--------+